package com.otherTest.keyWords.ThisKeyWord;

import org.junit.Test;

/**
 * Created by Administrator on 2017/8/7 0007.
 */
public class TestThis {
	@Test
	public void testThis(){
		This thiss=new This();
		//默认的无参的构造方法调用有参的构造方法
		System.out.println(thiss.getUserName());
		//返回代表自身类型的对象
        //谁调用它,就返回它
		This newThis=new This("返回对象").getNewThis();
		System.out.println(newThis.getUserName());
	}


}
